home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / bbs_util / tgdev301.zip / TELEGARD.INC < prev    next >
Text File  |  1996-06-09  |  97KB  |  1,689 lines

  1. (*****************************************************************************)
  2. (*>                                                                         <*)
  3. (*>                     Telegard Bulletin Board System                      <*)
  4. (*>         Copyright 1995,1996 by Tim Strike.  All rights reserved.        <*)
  5. (*>                                                                         <*)
  6. (*>                      Data types and structures                          <*)
  7. (*>                                                                         <*)
  8. (*****************************************************************************)
  9. (*****************************************************************************)
  10. (* ------------- IMPORTANT NOTICE -- PLEASE READ CAREFULLY ----------------- *)
  11. (*****************************************************************************)
  12.  
  13. {                                                         June 9th, 1996
  14.  
  15.    Note to all Telegard 3.0 developers:
  16.  
  17.    These structures are the final release structures for Telegard 3.0.
  18.  
  19.    These structures may be used to modify and create new programs which
  20.    will be compatible with Telegard 3.0.  Enclosed with this structure kit
  21.    are several documents which outline the various data file formats that
  22.    Telegard 3.0 uses.  The development documentation, DEVEL300.DOC, has
  23.    many helpful hints and information regarding most of the data file which
  24.    Telegard uses -- please read it before attempting to use the data
  25.    structures.
  26.  
  27.    The structures have been commented as best as possible.  If you need
  28.    more information on how to use/access data within these structures,
  29.    please see the accompanying documentation for contact methods.
  30.  
  31.    Several portions of these structures outline multinode capabilities.  As
  32.    of Telegard 3.0, the BBS is not fully multinode compatible.  A release
  33.    will be made as soon as possible which will accommodate full multinode
  34.    features.  Until then, presume that the features that have been outlined
  35.    in this document are up-to-date and working in Telegard 3.0.
  36.  
  37.    Thanks for your interest in Telegard 3.0.  Utility developers who wish
  38.    more information regarding distribution should look at the accompanying
  39.    documentation -- there are several helpful areas which should be read.
  40.  
  41.    We can use all the questions, comments and ideas that you can think of.
  42.  
  43.    Thanks,
  44.    Telegard 3.0 Development Team
  45.    }
  46.  
  47. (*****************************************************************************)
  48. (* ------------------------ CONSTANT DEFINITIONS --------------------------- *)
  49. (*****************************************************************************)
  50.  
  51. const
  52.  
  53.   maxword      = 65535;                       { TP/BP shortcoming . . . }
  54.  
  55.   maxarcs      = 10;                          { archive records  (1..max) }
  56.   maxprotocol  = 26;                          { protocol records (A..Z) }
  57.   maxlevel     = 26;                          { level records (A..Z) }
  58.   maxevents    = 15;                          { scheduled events (0..max) }
  59.                                               {  0 = -X[n] cmd (RESERVED) }
  60.   maxmenucmds  = 75;                          { menu commands    (1..max) }
  61.   maxqueue     = 20;                          { queue storage    (1..max) }
  62.   numvoteas    = 15;                          { voting answers   (0..max) }
  63.   numvoteqs    = 20;                          { voting questions (1..max) }
  64.  
  65.   mJAM         = 1;                           { JAM format }
  66.   mSquish      = 2;                           { Squish format }
  67.  
  68.   mLocal       = 1;                           { Local }
  69.   mNetmail     = 2;                           { Netmail }
  70.   mEchomail    = 3;                           { Echomail }
  71.  
  72.   mPublic      = 1;                           { Public Messages }
  73.   mPrivate     = 2;                           { Private Messages }
  74.   mPubPriv     = 3;                           { Public/Private Messages }
  75.  
  76.   atNo         = 1;                           {  No anonymous allowed }
  77.   atYes        = 2;                           {  Anonymous allowed }
  78.   atForced     = 3;                           {  Forced anonymous }
  79.   atDearabby   = 4;                           {  "Dear Abby" message base }
  80.   atAnyname    = 5;                           {  Anyname posting }
  81.  
  82. (*****************************************************************************)
  83. (* -------------------------- TYPE DEFINITIONS ----------------------------- *)
  84. (*****************************************************************************)
  85.  
  86. type
  87.  
  88.   acstring  = string[40];                     { Access Control System string }
  89.   intrange  = array[0..255] of integer;       { security tables - integers }
  90.   byterange = array[0..255] of byte;          { security tables - bytes }
  91.  
  92.   unixtime  = longint;                        { unix time stamp - seconds
  93.                                                   since 01/01/70 }
  94.  
  95.   acrq      = '@'..'Z';                       { AR flags }
  96.   acrqs     = set of acrq;                    { AR flags set }
  97.   uflag =                                     { user AC flags }
  98.   (
  99.     rlogon,                                   { L - One call per day }
  100.     rchat,                                    { C - Can't page the SysOp }
  101.     rnetmaildel,                              { F - Force Netmail deletion }
  102.     ramsg,                                    { A - Can't post AutoMessage }
  103.     rpostan,                                  { * - Can't post anonymously }
  104.     rpostpvt,                                 { E - Can't post private }
  105.     rpostnet,                                 { N - Can't post NetMail }
  106.     rpost,                                    { P - Can't post at all }
  107.     rvoting,                                  { K - Can't vote }
  108.     rmsg,                                     { M - Force Email deletion }
  109.     rpostecho,                                { G - Can't post EchoMail }
  110.     fnodlratio,                               { 1 - No UL/DL ratio }
  111.     fnopostratio,                             { 2 - No post/call ratio }
  112.     fnofilepts,                               { 3 - No file points checking }
  113.     fnodeletion,                              { 4 - Protection from deletion }
  114.     fnodailyratio,                            { 5 - No daily DL ratio }
  115.     fnodltime,                                { 6 - No DL time check }
  116.     fnopwchange,                              { 7 - No forced pw change }
  117.     ftimepercall                              { 8 - Time on per call basis }
  118.  );
  119.   uflags = set of uflag;                      { set of user AC flags }
  120.  
  121.   bitmapdate =                                { Bitmapped date format }
  122.   record
  123.      date,                                    { date  5432109876543210 }
  124.                                               {       Y----->M-->D---> }
  125.      time  : word;                            { time  5432109876543210 }
  126.                                               {       H--->M---->S---> }
  127.   end;
  128.  
  129. (*****************************************************************************)
  130. (* ------------------- CONFIGURATION DATA STRUCTURES ----------------------- *)
  131. (*****************************************************************************)
  132.  
  133.   configrec=            { CONFIG.TG : System configuration }
  134.   record
  135.      versionid:word;                          { version (eg $3000 = v3.0) }
  136.  
  137.      datapath,                                { DATA path }
  138.      textpath,                                { TEXT path }
  139.      langpath,                                { LANGUAGES path }
  140.      menupath,                                { MENUS path }
  141.      logspath,                                { LOG path }
  142.      msgpath,                                 { MSGS path }
  143.      semaphore,                               { SEMAPHORE path }
  144.      attachpath,                              { FILE ATTACH path }
  145.      swappath    : string[79];                { SWAP path }
  146.      arcpath,                                 { ARCHIVE path }
  147.      protpath    : string[40];                { PROTOCOL path }
  148.      filepath    : string[79];                { FILE PATH }
  149.      reserved1   : array[1..120] of byte;     { RESERVED }
  150.  
  151.      bbsname     : string[80];                { BBS name }
  152.      bbsphone    : string[20];                { BBS phone number }
  153.      bbslocation : string[50];                { BBS location }
  154.      sysopname   : string[30];                { SysOp's full name or alias }
  155.      multinode   : boolean;                   { System is Multinode? }
  156.      bulletprefix: string[8];                 { default bulletin prefix }
  157.      highbitinfo : boolean;                   { High-bit in user info? }
  158.      nodecheck   : byte;                      { NodeCheck threshold (s) }
  159.      nodetask    : boolean;                   { node from TASK environment }
  160.                                               {   if -Nnn not specified }
  161.      hiddenPW    : boolean;                   { Passwords are hidden? }
  162.                                               { 1. Always verify passwords
  163.                                               {    against user.pwcrc
  164.                                               { 2. TRUE  user.pwtext='' }
  165.                                               { 3. FALSE check user.pwcrc }
  166.                                               {    if crc(input)=user.pwcrc }
  167.                                               {    then set user.pwtext=pw }
  168.                                               { 4. If changing pw, always }
  169.                                               {    update CRC field -- VERY }
  170.                                               {    important! }
  171.      reserved2   : array[1..4] of byte;       { RESERVED }
  172.      localtimeout: boolean;                   { local timeout logoff? }
  173.      sysoppw     : string[20];                { SysOp PW }
  174.      timeoutbell,                             { minutes before timeout bell }
  175.      timeout,                                 { minutes before timeout logoff }
  176.      backsysoplogs,                           { days to keep SYSOP##.LOG }
  177.      slogtype    : byte;                      { SysOp log type
  178.                                                    0 - File
  179.                                                    1 - Printer
  180.                                                    2 - Both }
  181.      stripclog,                               { strip colors from SysOp log? }
  182.      compressbases: boolean;                  { "compress" base numbers? }
  183.      reserved3    : array[1..100] of byte;    { RESERVED }
  184.  
  185.      audiolowtime,                            { allowed audio hours }
  186.      audiohitime  : word;
  187.      monoscreen,                              { Monochrome screen }
  188.      useems,                                  { use EMS for overlay }
  189.      usebios,                                 { Use BIOS for local video output }
  190.      cgasnow      : boolean;                  { Suppress snow on CGA systems }
  191.      screensize,                              { screen size
  192.                                                    0 - Default/Auto
  193.                                                    1 - 25
  194.                                                    2 - 28 (VGA)
  195.                                                    3 - 43/50 (EGA/VGA) lines }
  196.      wfcblanktime : byte;                     { minutes to blank WFC menu screen }
  197.      printerport  : byte;                     { printer port (1-3) }
  198.      openfiledelay,                           { OpenFile delay b/w attempts }
  199.      openfileatt,                             { OpenFile attempts }
  200.      openfiletimeout,                         { OpenFile timeout message }
  201.      openfileabort : byte;                    { OpenFile timed abort }
  202.      reserved4    : array[1..20] of byte;     { RESERVED }
  203.  
  204.      chatpagelen,                             { Page length in seconds }
  205.      chatattempts,                            { # of chat attempts }
  206.      sysopcolor,                              { SysOp chat colour }
  207.      usercolor    : byte;                     { User chat colour }
  208.      chatreason,                              { Ask for a chat reason? }
  209.      chattime     : boolean;                  { Refund chat time? }
  210.      externalchat : string[79];               { External chat command }
  211.      chatdoortype : byte;                     { Chat door file type:        }
  212.                                               {   0: none       3: WWIV     }
  213.                                               {   1: GAP        4: PcBoard  }
  214.                                               {   2: RBBS-PC                }
  215.      reserved5    : array[1..74] of byte;     { RESERVED }
  216.  
  217.      fsecmd       : string[40];               { full screen editor command }
  218.      fsedoortype,                             { FSE door file type:         }
  219.                                               {   0: none       3: WWIV     }
  220.                                               {   1: GAP        4: PcBoard  }
  221.                                               {   2: RBBS-PC                }
  222.      swapshelltype: byte;                     { swap shell type: }
  223.                                               {   0: disk       2: XMS }
  224.                                               {   1: EMS               }
  225.      swaponarchive,                           { swap on archive command }
  226.      swapondoor,                              { swap on door command }
  227.      swapondosshell,                          { swap on DOS shell }
  228.      swaponevent,                             { swap on DOS Shell event }
  229.      swaponfse,                               { swap on full-screen editor }
  230.      swaponsysbat,                            { swap on system batch files }
  231.      swaponxfer,                              { swap on file transfer }
  232.      swapshell    : boolean;                  { swap shell function enabled? }
  233.      envspace     : word;                     { DOS Environment Space }
  234.      reserved6    : array[1..48] of byte;     { RESERVED }
  235.  
  236.      timeallow    : intrange;                 { daily time }
  237.      callallow,                               { daily calls }
  238.      dlratio      : byterange;                { # ULs/# DLs ratios }
  239.      dlkratio     : intrange;                 { DL/UL KB ratios }
  240.      postratio,                               { post/call ratios }
  241.      dailyratio   : byterange;                { daily DL #files ratios }
  242.      dailykratio,                             { daily DL KB ratios }
  243.      timebankmax  : intrange;                 { timebank max limit }
  244.      timedeposit,                             { timebank daily deposit }
  245.      timewithdraw : byterange;                { timebank daily withdraw }
  246.  
  247.      ansitype,                                { ANSI Logon -
  248.                                                    0  Ask
  249.                                                    1  Detect
  250.                                                    2  Force NO
  251.                                                    3  Force YES }
  252.      lastcallers,                             { days of last callers }
  253.      maxlogontries,                           { tries for PW's at logon }
  254.      maxlogonmins : byte;                     { minutes allowed for logon }
  255.      allowalias,                              { allow aliases? (handles) }
  256.      datapw,                                  { data phone # password }
  257.      voicepw,                                 { voice phone # password }
  258.      localsec,                                { is local security ON? }
  259.      displaysec,                              { is local screen-security ON? }
  260.      globaltrap,                              { trap ALL USER'S activity? }
  261.      autochatopen,                            { auto open chat capture? }
  262.      languagefirst: boolean;                  { language selection first? }
  263.      reserved6a   : byte;
  264.      lcallinlogon : byte;                     { "Last Calls" list in logon? }
  265.      reserved7    : byte;                     { RESERVED }
  266.      offhooklocallogon,                       { phone off-hook for local? }
  267.      forcevoting,                             { logon voting mandatory? }
  268.      iemsi,                                   { allow IEMSI logons }
  269.      checkmulti   : boolean;                  { check for mutliple logons }
  270.      reserved8    : array[1..41] of byte;     { RESERVED }
  271.      logonmenu,                               { logon menu to start users on }
  272.      watcharea,                               { area for pw attempt warnings }
  273.      inquiryarea  : string[8];                { area for forgotten pw inquiry }
  274.      passdays     : word;                     { # of days to change password }
  275.      updatelocal  : boolean;                  { local calls in statistics }
  276.      timeleftbank : boolean;                  { timebank prompt w/no time? }
  277.      minbaud,                                 { minimum logon baudrate }
  278.      graphicsbaud : longint;                  { minimum graphics baudrate }
  279.      reserved9    : array[1..63] of byte;     { RESERVED }
  280.  
  281.      newapp       : string[36];               { new user letter to user }
  282.      opensystem,                              { allow new users? }
  283.      newiemsi     : boolean;                  { Allow IEMSI new user logons }
  284.      linelen,                                 { default video line length }
  285.      pagelen,                                 { default video page length }
  286.      datefmt      : byte;                     { date format - 0 ASK }
  287.      scanphone,                               { Scan for duplicate phone #'s }
  288.      autopassword : boolean;                  { Allow auto-created pw's }
  289.      language     : string[8];                { Default language, ''  Ask }
  290.      ansi,                                    { ANSI               0  Ask }
  291.      avatar,                                  { Avatar             1  Yes }
  292.      clrscr,                                  { Clear Screen       2  No }
  293.      pause,                                   { Screen Pause }
  294.      hotkeys,                                 { Hotkeys }
  295.      fse          : byte;                     { Full Screen Editor }
  296.      mailaddress,                             { Ask for Mail Address }
  297.      gender,                                  {         Gender }
  298.      dataph,                                  {         Data Phone }
  299.      voiceph,                                 {         Voice Phone }
  300.      dob          : boolean;                  {         Date of Birth }
  301.      newuserlevel : char;                     { New User level }
  302.      flinput      : byte;                     { Full-line input   0 Ask }
  303.                                               {                   1 Yes }
  304.                                               {                   2 No }
  305.      countryinput : byte;                     { Country input   0 Ask }
  306.                                               {                 1 U.S. }
  307.                                               {                 2 Canada }
  308.                                               {                 3 Int'l }
  309.      killcolor    : boolean;                  { Strip colour from entry fields }
  310.      reserved10   : array[1..30] of byte;     { RESERVED }
  311.      crosspost    : acstring;                 { Cross post message }
  312.  
  313.      batchfileext : string[3];                { batch filename extension }
  314.      reserved11   : array[1..32] of byte;     { RESERVED }
  315.  
  316.      minspaceforpost: word;                   { minimum drive space to post }
  317.      emaillist,                               { allow email user listing? }
  318.      smartquote,                              { use smartquote features? }
  319.      quickquote    : boolean;                 { use quickquote features? }
  320.      ccmail,                                  { carbon copy messages }
  321.      creq,                                    { request confirm receipt }
  322.      fileattach,                              { attach file - non-netmail }
  323.      normpubpost,                             { post public messages }
  324.      normprivpost,                            { post private messages }
  325.      normnetpost,                             { post netmail messages }
  326.      nopostratio,                             { no post/call ratio }
  327.      anonpubread,                             { see who posted public anon }
  328.      anonprivread,                            { see who posted private anon }
  329.      anonpubpost,                             { post anon public messages }
  330.      anonprivpost  : acstring;                { post anon private messages }
  331.      netconfirm,                              { honour confirmation request }
  332.      msguploads,                              { allow upload of messages }
  333.      nodelookup    : boolean;                 { allow nodelist lookup }
  334.      fileattachnet : acstring;                { attach file - netmail }
  335.      antiqueUUCP   : boolean;                 { antique UUCP; UUCP in header,
  336.                                                    TO: in message }
  337.      writescanlog  : string[40];              { path to ECHOMAIL.JAM/NETMAIL.JAM }
  338.      checkfsesave  : boolean;                 { check fse save }
  339.      reserved13    : array[1..15] of byte;    { RESERVED }
  340.  
  341.      sop,                                     { SysOp }
  342.      csop,                                    { Co-SysOp }
  343.      spw           : acstring;                { SysOp PW at logon }
  344.  
  345.      wfc           : array[1..15] of byte;    { WFC Menu Colours }
  346.      heartbeat     : boolean;                 { WFC "Heartbeat" }
  347.      reserved14    : array[1..25] of byte;    { RESERVED }
  348.  
  349.      qwkpktname,                              { packet name }
  350.      qwkwelcomefile,                          { BBS welcome file }
  351.      qwknewsfile,                             { BBS news file }
  352.      qwkgoodbyefile: string[8];               { BBS goodbye file }
  353.      qwklocaldlpath,                          { local QWK download path }
  354.      qwklocalulpath : string[40];             { local REP upload path }
  355.      reserved15   : array[1..41] of byte;     { RESERVED }
  356.      qwkmaxmsgs   : word;                     { max messages to DL (0=unlim) }
  357.      qwkarc       : string[3];                { default archive }
  358.      qwkextctrl   : boolean;                  { extended CONTROL.DAT info }
  359.      qwknewsgen   : string[60];               { news program }
  360.      qwkfilesgen  : string[60];               { new files program }
  361.      qwknews,                                 { include news       0 Ask }
  362.      qwkwelcome,                              { include welcome    1 Yes }
  363.      qwkgoodbye,                              { include goodbye    2 No  }
  364.      qwknewfiles,                             { include new files list }
  365.      qwksession   : byte;                     { include session texts }
  366.  
  367.      reserved16   : array[1..95] of byte;     { RESERVED }
  368.  
  369.      ulbase       : string[8];                { default UL base }
  370.      showulname   : boolean;                  { Show upload name }
  371.      blindulacs   : acstring;                 { blind upload ACS }
  372.      filetest     : byte;                     { file upload test type }
  373.                                               {    0 : none }
  374.                                               {    1 : archive integrity }
  375.                                               {    2 : upload processor }
  376.      filepwacs    : acstring;                 { acs for users to add pw }
  377.      truncdesc    : boolean;                  { truncate file_id/testinfo }
  378.                                               {   imported descriptions }
  379.      drive_tblupd : byte;                     { CD-ROM drive table update }
  380.                                               {     0 : every call }
  381.                                               { 1-254 : once every n hours }
  382.                                               {   255 : never }
  383.      searchdup,                               { search for dupe filenames }
  384.      globaldl,                                { global downloads }
  385.      allowdldesc,                             { allow description download }
  386.      importfileid,                            { import file descriptions }
  387.      nodupeext    : boolean;                  { no check of extension on dupe files }
  388.      reserved17   : byte;                     { RESERVED }
  389.      unlistfp,                                { file points for unlisted DLs }
  390.      ulrefund,                                { percent time refund for ULs }
  391.      dlchecktype  : byte;                     { DL checking (0=off,1=UL/DL,2=points) }
  392.      maxintemp,                               { max KB allowed in TEMP\ARC\ }
  393.      minspaceul,                              { minimum KB drive space left to upload }
  394.      ulfpkbyte,                               { UL K-bytes per file point }
  395.      ulfpforfile,                             { UL # points assigned to file }
  396.      ulfpforuser  : word;                     { UL # points assigned to user }
  397.      sysopulbase  : string[8];                { file base for SysOp uploads }
  398.      seeunval,                                { see unvalidated files }
  399.      dlunval,                                 { DL unvalidated files }
  400.      ulvalreq     : acstring;                 { UL validated not-required }
  401.      virusscanner : string[80];               { Virus Scanner Command }
  402.      passederrlvl : byte;                     { Passed Scanner Errorlevel }
  403.      gifspectype  : byte;                     { Gifspec type   0 Last line }
  404.                                               {                1 Before* }
  405.                                               { * old method, desc is }
  406.                                               { truncated if necessary }
  407.      useTESTINFO  : boolean;                  { import TESTINFO.DAT -- if }
  408.                                               { virus scanner creates it }
  409.      testpath     : string[40];               { path to TESTINFO.DAT }
  410.      textview     : boolean;                  { allow text w/archive view }
  411.      pausebefore  : boolean;                  { pause list before next dir }
  412.      dlunavail    : acstring;                 { dl unavailable (failed) files }
  413.   end;
  414.  
  415.   systemrec=            { SYSTEM.DAT : System operational variables }
  416.   record
  417.      usereditlvl,                             { type of user editor }
  418.                                               {    0..2 - Short..Long }
  419.      curwindow    : byte;                     { type of SysOp window }
  420.      istopwindow  : boolean;                  { SysOp window on top? }
  421.      callernum    : longint;                  { total number of callers }
  422.      windowon     : boolean;                  { is SysOp window on? }
  423.      reserved     : array[1..400] of byte;    { RESERVED }
  424.   end;
  425.  
  426. (*****************************************************************************)
  427. (* ------------------------ USER DATA STRUCTURES --------------------------- *)
  428. (*****************************************************************************)
  429.  
  430.   userstat=             { USERS.DAT status flags }
  431.   (
  432.      lockedout,                               { if locked out }
  433.      udeleted,                                { if deleted }
  434.      trapactivity,                            { if trapping users activity }
  435.      trapseparate,                            { if trap to separate TRAP file }
  436.      chatauto,                                { if auto chat trapping }
  437.      chatseparate,                            { if separate chat file to trap to }
  438.      slogseparate,                            { if separate SysOp log }
  439.      alert                                    { alert SysOp when user logs on }
  440.   );
  441.   userstatus = set of userstat;
  442.  
  443.   userflag=             { USERS.DAT user flags }
  444.   (
  445.      newusermsg,                              { sent newuser message }
  446.      clsmsg,                                  { clear screen before messages }
  447.      flinput,                                 { full line input }
  448.      hotkey,                                  { menu hotkeys active }
  449.      pause,                                   { pause }
  450.      novice,                                  { user is at novice help level }
  451.      hiddenlog,                               { not displayed in call/online listings }
  452.      hiddenlist                               { not displayed in user listings }
  453.   );
  454.   userflags = set of userflag;
  455.  
  456.   userrec=              { USERS.DAT : User account records }
  457.   record
  458.      name,                                    { user name }
  459.      realname   : string[36];                 { real name }
  460.      street,                                  { mailing address }
  461.      location   : string[30];                 { city, province }
  462.      postalcode : string[10];                 { postal code }
  463.      voiceph,                                 { voice phone # }
  464.      dataph     : string[20];                 { data phone # }
  465.  
  466.      pwtext     : string[20];                 { user password }
  467.   
  468.      { DEVELOPERS NOTE:  The pwtext field *may* be empty.  Please observe
  469.      the following when updating passwords:
  470.  
  471.         1. All password input is UPPERCASE
  472.         2. If ConfigRec.HiddenPW = TRUE, then only the CRC32 of the password
  473.            is stored in the user record (userrec.crcpw). 
  474.         3. If ConfigRec.HiddenPW = FALSE, both the CRC32 and the actual
  475.            password are stored in the user record.
  476.        *4. When checking input passwords against the file, only the CRC32
  477.            value should be tested (the pwtext may or may not be correct).  
  478.            If ConfigRec.HiddenPW = FALSE, and the pwtext field is EMPTY, 
  479.            then after a correct password the field will be automatically
  480.            updated.  If ConfigRec.HiddenPW = TRUE, the pwtext will *not* be 
  481.            updated (this is obvious).
  482.        *5. Passwords should *only* be displayed (pwtext) if the CRC32 of
  483.            the pwtext field *matches* the pwcrc field.  Otherwise, the 
  484.            pwtext field is likely incorrect.  When changing passwords, the
  485.            user should be prompted only, not shown their previous password.
  486.      }    
  487.  
  488.      lastdate   : unixtime;                   { laston date/time }
  489.      firstdate,                               { firston date }
  490.      pwdate,                                  { last date of pw change }
  491.      birthdate  : string[8];                  { birth date }
  492.      gender     : char;                       { gender - M/F }
  493.      subdate,                                 { subscription started }
  494.      expiredate : string[8];                  { subscription expires }
  495.      expireto   : char;                       { expire to level A..Z,
  496.                                                   !=Delete }
  497.      comment    : string[40];                 { SysOp comment on User }
  498.      notes      : array[1..3] of              { SysOp definable variables }
  499.                   string[40];
  500.      lockfile   : string[8];                  { lockout msg to print }
  501.  
  502.      pwcrc      : longint;                    { CRC-32 of user password }
  503.  
  504.      reserved1  : array[1..14] of byte;       { RESERVED }
  505.      ugraphics  : byte;                       { user graphics protocol }
  506.                                               {   0 : TTY - no fallback }
  507.                                               {   1 : ANSI   }
  508.                                               {   2 : Avatar }
  509.                                               {   3 : RIP    }
  510.      fallback   : byte;                       { 2nd fallback protocol }
  511.                                               {   1 : ANSI   }
  512.                                               {   2 : Avatar }
  513.                                               {   3 : RIP    }
  514.                                               { 3rd TTY }
  515.      linelen,                                 { line length (# cols) }
  516.      pagelen    : byte;                       { page length (# rows) }
  517.      flags      : userflags;                  { flags (see above) }
  518.      status     : userstatus;                 { status (see above) }
  519.      reserved2  : byte;                       { RESERVED }
  520.  
  521.      sl         : byte;                       { SL }
  522.      ac         : uflags;                     { user flags }
  523.      aflags1,                                 { Access flags - Set 1 }
  524.      aflags2    : acrqs;                      { Access flags - Set 2 }
  525.      userID     : longint;                    { unique User-ID - THIS VALUE
  526.                                                 SHOULD NOT BE CHANGED BY
  527.                                                 ANY PROGRAM }
  528.      level      : char;                       { current validation level }
  529.      datefmt    : byte;                       { Date Format }
  530.                                               {   0 - MM/DD/YY }
  531.                                               {   1 - DD/MM/YY }
  532.                                               {   2 - YY/MM/DD }
  533.      reserved7  : char;                       { RESERVED }              
  534.      macroptr   : longint;                    { pointer for MACROS.DAT
  535.                                                   -1 = none }
  536.      votedate   : unixtime;                   { last vote }
  537.      reserved3  : array[1..17] of byte;       { RESERVED }
  538.  
  539.      lastconf   :char;                        { last conference }
  540.      lastmsg,                                 { last message base # }
  541.      pubpost,                                 { # public posts }
  542.      privpost,                                { # private posts }
  543.      netpost    : word;                       { # netmail posts }
  544.      mailbox    : string[36];                 { mailbox status
  545.                                                   ''        Open/Normal
  546.                                                   'CLOSED'  Closed
  547.                                                   Username  Forwarded to... }
  548.      credit,                                  { Netmail points (credit) }
  549.      debit      : longint;                    { Netmail points (debit) }
  550.      fsetype    : byte;                       { FSE usage (0=never,1=always,2=ask) }
  551.      
  552.      reserved4  : array[1..32] of byte;       { RESERVED }
  553.  
  554.      qwkarc     : string[3];                  { QWK default archiver }
  555.      qwkfromyou,                              { bundle from user }
  556.      qwkbwctrl,                               { create BW control file }
  557.      qwknews,                                 { include news }
  558.      qwkwelcome,                              { include welcome }
  559.      qwkgoodbye,                              { include goodbye }
  560.      qwknewfiles,                             { include new files list }
  561.      qwkpointer,                              { include pointer file }
  562.      qwksession : boolean;                    { include session listing }
  563.      reserved5  : array[1..23] of byte;       { RESERVED }
  564.  
  565.      defprotocol: char;                       { default protocol (A-Z) }
  566.                                               {   ! Select at download time }
  567.      lastfile,                                { last file base # }
  568.      uploads,                                 { amount ULed (files) }
  569.      downloads,                               { amount DLed (files) }
  570.      todaydl    : word;                       { amount DLed today (files) }
  571.      uk,                                      { amount ULed (kbytes) }
  572.      dk,                                      { amount DLed (kbytes) }
  573.      todaydk,                                 { amount DLed today (kbytes) }
  574.      filepoints : longint;                    { file points remaining }
  575.  
  576.      totaltime  : longint;                    { total time on system }
  577.      timebank,                                { # mins in Time Bank }
  578.      totalcalls : word;                       { total calls to system }
  579.      tltoday,                                 { time left today }
  580.      tbtoday    : integer;                    { bank activity +/- time }
  581.      todaycalls,                              { calls to system today }
  582.      illegal    : byte;                       { illegal logons }
  583.      vote       : array[1..numvoteqs]         { voting information }
  584.                      of byte;
  585.      language   : string[8];                  { language }
  586.      reserved6  : byte;                       { RESERVED}
  587.   end;
  588.  
  589.   useridxrec=           { USERS.IDX : Sorted names listing }
  590.   record
  591.      name   : string[36];                     { user name/handle }
  592.      number : integer;                        { user record # }
  593.                                               {    -1 = Deleted }
  594.   end;
  595.  
  596.   IDidxrec=             { USERID.IDX : Sorted ID listing }
  597.   record
  598.      userID : longint;                        { User-ID from user record }
  599.      number : integer;                        { user record # }
  600.                                               {    -1 = Deleted }
  601.   end;
  602.  
  603. (*****************************************************************************)
  604. (* ------------------------ AREA DATA STRUCTURES --------------------------- *)
  605. (*****************************************************************************)
  606.  
  607.   areaidxrec=           { FAREAS.IDX/MAREAS.IDX: Area index records }
  608.   record
  609.      name   : string[8];                      { base filename }
  610.      number : integer;                        { base record # }
  611.                                               {    -1 = Deleted }
  612.   end;
  613.  
  614. (*****************************************************************************)
  615. (* ---------------------- FILE AREA DATA STRUCTURES ------------------------ *)
  616. (*****************************************************************************)
  617.  
  618.   fareaflags=           { FAREAS.DAT status flags }
  619.   (
  620.      fbnoratio,                               { < No Ratio > active }
  621.      fbvisible,                               { Visible to users w/o access }
  622.      fbRESERVED1,                             { RESERVED }
  623.      fbcdrom,                                 { CD-ROM/read-only media }
  624.      fbusegifspecs                            { whether to use GifSpecs }
  625.   );
  626.  
  627.   farearec=             { FAREAS.DAT : File base records }
  628.   record
  629.      desc       : string[40];                 { area description }
  630.      filename,                                { filename }
  631.      infofile   : string[8];                  { info filename }
  632.      path       : string[40];                 { path }
  633.      arctype    : string[3];                  { archive (''=inactive) }
  634.      reserved1  : byte;                       { RESERVED }
  635.      fstatus    : set of fareaflags;          { file area status }
  636.      sysopacs,                                { SysOp access }
  637.      listacs,                                 { list/view access }
  638.      nameacs,                                 { see uploader name access }
  639.      ulacs,                                   { upload access }
  640.      dlacs      : acstring;                   { download access }
  641.      scantype   : byte;                       { scan type  0 = Default ON
  642.                                                            1 = Default OFF
  643.                                                            2 = Always }
  644.      cdlabel    : string[11];                 { CD-ROM label }
  645.      createdate : unixtime;                   { base creation date }
  646.      filepath   : string[40];                 { *.FB? storage path }
  647.      reserved2  : array[1..42] of byte;       { RESERVED }
  648.   end;
  649.  
  650.   fileidxrec=           { FILES.IDX: File index record }
  651.   record
  652.      filename   : string[12];                 { filename [key] }
  653.      filebase,                                { filebase }
  654.                                               {   -1 = deleted }
  655.      filerecord : integer;                    { file offset }
  656.      reserved   : array[1..4] of byte;        { RESERVED }
  657.   end;
  658.  
  659.   fbstat=               { *.FB status flags }
  660.   (
  661.      freedl,                                  { if file is free }
  662.      notime,                                  { if file is time check free }
  663.      validated,                               { if file is validated }
  664.      available,                               { if file is available - will }
  665.                                               {    be toggled FALSE only }
  666.                                               {    if failed by filescan }
  667.      offline,                                 { if file is offline }
  668.      hatch                                    { if file hatched via SDS }
  669.   );
  670.  
  671.   fbrec=                { *.FB : File records }
  672.   record
  673.      filename    : string[12];                { filename }
  674.      description : string[45];                { description }
  675.      extended,                                { pointer to extended desc }
  676.                                               {    -1 = no extended desc }
  677.      size        : longint;                   { length of file (bytes) }
  678.      uldate,                                  { date uploaded }
  679.      filedate,                                { date on file }
  680.      dldate      : unixtime;                  { date last downloaded }
  681.      filestatus  : set of fbstat;             { file status }
  682.      filepoints,                              { points }
  683.      downloads   : Word;                      { number downloads }
  684.      uploader    : string[36];                { uploader's name }
  685.      passwordCRC : longint;                   { CRC of password to dl }
  686.      reserved    : array[1..20] of byte;      { RESERVED }
  687.   end;
  688.  
  689.   fbextrec=             { *.FBE : Extended descriptions }
  690.   record
  691.      filename : string[12];                   { filename (for reference) }
  692.      desc     : array[1..5] of string[45];    { description }
  693.      nextlink : longint;                      { offset to next record }
  694.                                               {    -1 = last record }
  695.      reserved : array[1..10] of byte;         { RESERVED }
  696.   end;
  697.  
  698.  { The record offset into the *.FSI file is userrec.userid-1 (ie, if userid
  699.    field = 2 then the record offset into file scan tables file is 1). }
  700.  
  701.   fbscanrec=            { *.FSI : File scan records }
  702.   record
  703.      filescan  : boolean;                     { base in file scan }
  704.   end;
  705.  
  706.   driverec=             { DRIVES.DAT : CDROM/Network label storage }
  707.   record
  708.      update    : unixtime;                    { last update }
  709.      disktype  : array[0..25] of byte;        { drive type }
  710.                                               { 0-2: None, Floppy, HD }
  711.                                               {  3 - CDROM }
  712.                                               {  4 - Network }
  713.      disklabel : array[0..25] of string[11];  { drive labels }
  714.   end;
  715.  
  716.   queuerec=             { *.QQQ transfer queue record }
  717.   record
  718.      filename  : string[12];                  { filename }
  719.      filearea  : longint;                     { file base # }
  720.                                               { UL: -1  SysOp Area }
  721.      desc      : string[45];                  { description }
  722.      extended  : longint;                     { desc offset in *.QQD }
  723.      path      : string[55];                  { DL: path of file }
  724.      filepw    : longint;                     { UL: File password }
  725.      reserved  : byte;                        { RESERVED }
  726.      points    : integer;                     { DL: # file points }
  727.      filesize  : longint;                     { DL: filesize (bytes) }
  728.      freeratio,                               { DL: file is FREE ratio }
  729.      freetime  : boolean;                     { DL: file is FREE time }
  730.      readonly  : boolean;                     { Dl: file on read-only media }
  731.   end;
  732.  
  733. (*****************************************************************************)
  734. (* -------------------- MESSAGE AREA DATA STRUCTURES ----------------------- *)
  735. (*****************************************************************************)
  736.  
  737.   mareaflags=           { MAREAS.DAT status flags }
  738.   (
  739.      mbrealname,                              { real names are forced }
  740.      mbvisible,                               { visible to users w/o access }
  741.      mbansi,                                  { filter ANSI }
  742.      mb8bit,                                  { filter 8-bit }
  743.      mbstrip,                                 { strip center/title codes }
  744.      mbaddtear,                               { add tear/origin lines }
  745.      mbnopubstat,                             { messages not added to user }
  746.                                               {   public post total - i.e. }
  747.                                               {   will not calculate in PCR }
  748.      mbnocredit,                              { Netmail credit not used }
  749.      mbinternet,                              { Internet (UUCP) handling }
  750.      mbfattach,                               { allow file attaches }
  751.      mbstripcolour                            { strip TG colour codes }
  752.   );
  753.  
  754.   marearec=             { MAREAS.DAT : Message base records }
  755.   record
  756.      name,                                    { message base description }
  757.      msgpath    : string[40];                 { messages pathname }
  758.      filename,                                { data filenames }
  759.      infofile   : string[8];                  { base info filename }
  760.      readacs,                                 { read access }
  761.      postacs,                                 { post access }
  762.      sysopacs,                                { SysOp access }
  763.      netacs     : acstring;                   { network access }
  764.      maxmsgs,                                 { max message count }
  765.      maxdays    : word;                       { max days to keep messages }
  766.      mstatus    : set of mareaflags;          { status }
  767.      mbformat,                                { message base format }
  768.      mbtype,                                  { message base type }
  769.      anonymous,                               { anonymous type }
  770.      mbpost     : byte;                       { message base posting type }
  771.      origin     : string[50];                 { origin line }
  772.      kludge_color,                            { color of kludge line }
  773.      quote_color,                             { color of quoted line }
  774.      tear_color,                              { color of tear line }
  775.      origin_color,                            { color of origin line }
  776.      addr,                                    { network addr (0:AKA) }
  777.      scantype   : byte;                       { scan type  0 = Default ON
  778.                                                            1 = Default OFF
  779.                                                            2 = Mandatory }
  780.      createdate : unixtime;                   { base creation date }
  781.      qwkindex   : longint;                    { QWK-permanent index }
  782.      text_color : byte;                       { color of text line }
  783.      reserved   : array[1..40] of byte;       { RESERVED }
  784.   end;
  785.  
  786.  { The record offset into the *.MSI file is userrec.userid-1 (ie, if userid
  787.    field = 2 then the record offset into message scan tables file is 1).
  788.    This is the same offset that is used for the Squish (*.SQL) last read
  789.    files.  The JAM (*.JLR) records can be searched for the matching userID
  790.    to load lastread record. }
  791.  
  792.   mbscanrec=            { *.MSI : Message scan/lastread pointers }
  793.   record
  794.      mailscan,                                { base in mail scan }
  795.      qwkscan   : boolean;                     { base in qwk scan }
  796.   end;
  797.  
  798.   qwkidxrec=            { QWK.IDX : QWK message base index }
  799.   record
  800.      areanum : integer;                       { QWK area number }
  801.      areatag : string[8];                     { message base filename }
  802.   end;
  803.  
  804.   qptrrec=              { packetid.QPT : QWK lastread pointer record }
  805.   record
  806.      areanum  : integer;                      { QWK area number }
  807.      lastread : longint;                      { last read pointer }
  808.   end;
  809.  
  810.  
  811. (*****************************************************************************)
  812. (* ----------------------- OTHER DATA STRUCTURES --------------------------- *)
  813. (*****************************************************************************)
  814.  
  815.   menuflag=            { Menu header status flags }
  816.   (
  817.      clrscrbefore,                            { C: clrscr before menu? }
  818.      dontcenter,                              { D: don't center titles! }
  819.      forcefullline,                           { F: force full line input }
  820.      nomenuprompt,                            { N: no menu prompt }
  821.      forcepause,                              { P: force pause before menu? }
  822.      autotime,                                { T: auto time display? }
  823.      dontcentersub,                           { S: don't center subtitles! }
  824.      forcekey                                 { K: force key input }
  825.   );
  826.  
  827.   menurec=              { *.MNU : Menu header }
  828.   record
  829.      menutitle : array[1..3] of               { menu titles }
  830.                        string[100];
  831.      dispfile,                                { help file displayed }
  832.                                               {   ''       Generic }
  833.      helpfile  : string[12];                  { tutorial help file }
  834.                                               {   ''       Generic }
  835.                                               {   '*OFF*'  Disabled }
  836.      prompt    : string[120];                 { menu prompt }
  837.      menuacs   : acstring;                    { access requirements }
  838.      password  : string[15];                  { password required }
  839.      fallback  : string[8];                   { fallback menu }
  840.      helplevel,                               { forced help level for menu }
  841.      columns   : byte;                        { generic menu: # of columns }
  842.      colours   : array[1..6] of byte;         { generic menu: colours }
  843.      menuflags : set of menuflag;             { menu status variables }
  844.      global    : boolean;                     { load global menu }
  845.      reserved1 : word;                        { RESERVED }
  846.      nodestat  : string[36];                  { Who's Online Status }
  847.      reserved2 : array[1..10] of byte;        { RESERVED }
  848.   end;
  849.  
  850.   commandrec=           { *.MNU : Command records }
  851.   record
  852.      ldesc     : string[70];                   { long description }
  853.      sdesc     : string[35];                   { short description }
  854.      reserved  : string[15];                   { RESERVED }
  855.      keys      : string[14];                   { execute keys }
  856.                                                {   'FIRSTCMD' = Exec. Menu Loaded }
  857.                                                {   'TITLE' = Sub-title }
  858.                                                {   'ENTER' = <ENTER> }
  859.                                                {   'SPACE' = <SPACEBAR> }
  860.      acs       : acstring;                     { access requirements }
  861.      cmdtype   : string[2];                    { command type }
  862.      options   : string[50];                   { command options }
  863.      viewtype  : byte;                         { display of command }
  864.                                                {    0  ACS dependent }
  865.                                                {    1  Always visbile }
  866.                                                {    2  Always hidden }
  867.   end;
  868.  
  869. (*---------------------------------------------------------------------------*)
  870.  
  871.   bbslistrec=           { *.BBS : BBS Listings }
  872.   record
  873.      phone          : string[20];             { BBS Phone Number }
  874.      name,                                    { BBS Name }
  875.      sysop          : string[30];             { BBS SysOp Name }
  876.      description    : string[30];             { Other Description }
  877.      speed          : string[4];              { Speed }
  878.      software       : string[8];              { Software }
  879.      firstdate,                               { First date added }
  880.      lastedit       : unixtime;               { Last date edited }
  881.      editor         : string[36];             { entry editor }
  882.   end;
  883.  
  884. (*---------------------------------------------------------------------------*)
  885.  
  886.   archiverec=           { ARCHIVE.DAT : Archiver Setup }
  887.   record
  888.      active      : boolean;                   { is this format active? }
  889.      extension   : string[3];                 { archive extension }
  890.      description,                             { archiver description }
  891.      compress,                                { pack archive command }
  892.      decompress,                              { unpack archive command }
  893.      test,                                    { test archive command }
  894.      view,                                    { view archive command }
  895.                                               {   ''=internal (if avail) }
  896.      comment     : string[50];                { comment archive command }
  897.      success     : byte;                      { success errorlevel }
  898.      viewcapture : boolean;                   { redirect external viewer }
  899.      reserved    : array[1..34] of byte;      { RESERVED }
  900.   end;
  901.  
  902. (*---------------------------------------------------------------------------*)
  903.  
  904.   confrec=              { GROUPS.DAT : Group data }
  905.   array['@'..'Z'] of
  906.   record
  907.      acs      : acstring;                     { ACS requirement }
  908.      name     : string[40];                   { name of conference }
  909.      visible  : boolean;                      { visible w/o ACS }
  910.      reserved : array[1..20] of byte;         { RESERVED }
  911.   end;
  912.  
  913. (*---------------------------------------------------------------------------*)
  914.  
  915.   eventflags=           { EVENTS.DAT status flags }
  916.   (
  917.      active,                                  { event is active }
  918.      busyduring,                              { phone off-hook during event }
  919.      monthly,                                 { event is executed monthly }
  920.      forced                                   { event is forced }
  921.   );
  922.  
  923.   eventrec=             { EVENTS.DAT : Scheduled event records }
  924.   array[0..maxevents] of
  925.      record
  926.      flags    : set of eventflags;            { status flags }
  927.      desc     : string[30];                   { description }
  928.      etype    : char;                         { event type:
  929.                                                  A:ACS,
  930.                                                  C:Chat,
  931.                                                  E:External,
  932.                                                  O:OS }
  933.      execdata : string[40];                   { event data:
  934.                                                  ACS:  ACS command
  935.                                                  OS:   OS command
  936.                                                  Exit: ERRORLEVEL for exit }
  937.      exectime,                                { execution time (minutes) }
  938.      duration : word;                         { event duration (minutes) }
  939.      execdays : byte;                         { monthly: day (1-28)
  940.                                                   daily: days (bitwise) }
  941.      lastexec : unixtime;                     { date event last executed }
  942.      node     : word;                         { affected nodes (0=all) }
  943.   end;
  944.  
  945. (*---------------------------------------------------------------------------*)
  946.  
  947.   historyrec =          { HISTORY.DAT : History logs }
  948.   record
  949.      date      : string[8];                   { history date }
  950.      userbaud  : array[0..25] of word;        { logon BPS rates   }
  951.                                               {    0 - Local   10 - 16800  }
  952.                                               {    1 - 300     11 - 19200  }
  953.                                               {    2 - 1200    12 - 21600  }
  954.                                               {    3 - 1275    13 - 24000  }
  955.                                               {    4 - 2400    14 - 26400  }
  956.                                               {    5 - 4800    15 - 28800  }
  957.                                               {    6 - 7200    16 - 38400  }
  958.                                               {    7 - 9600    17 - 57600  }
  959.                                               {    8 - 12000   18 - 64000  }
  960.                                               {    9 - 14400   19 - 115200 }
  961.      active,                                  { % activity }
  962.      calls,                                   { # of calls }
  963.      newusers,                                { # of new users }
  964.      pubpost,                                 { # of public posts }
  965.      privpost,                                { # of private posts }
  966.      netpost,                                 { # of netmail posts }
  967.      criterr,                                 { # of critical errors }
  968.      uploads,                                 { # of uploads }
  969.      downloads : word;                        { # of downloads }
  970.      uk,                                      { amount ULed in KB }
  971.      dk        : longint;                     { amount DLed in KB }
  972.      reserved  : array[1..16] of byte;        { RESERVED }
  973.   end;
  974.  
  975. (*---------------------------------------------------------------------------*)
  976.  
  977.   iemsirec=             { IEMSI.DAT : IEMSI connection record }
  978.   record
  979.      realname,                                { User's Real Name }
  980.      handle       : string[36];               { User's Handle }
  981.      location     : string[30];               { User's Location }
  982.      dataph,                                  { User's Data Phone # }
  983.      voiceph,                                 { User's Voice Phone # }
  984.      password     : string[20];               { User's Password }
  985.      birthdate    : unixtime;                 { User's Birthdate }
  986.      linelen,                                 { Screen Width }
  987.      pagelen      : byte;                     { Screen Length }
  988.      screentype   : byte;
  989.      protocols    : string[10];               { Protocol to use }
  990.                                               {    DZA* DirectZAP Zmodem
  991.                                                    ZAP* ZedZap Zmodem -> 8K
  992.                                                    ZMO  Zmodem -> 1K (Z)
  993.                                                    SLK* SEAlink
  994.                                                    KER* Kermit }
  995.      capabilities : string[25];               { System Capabilities }
  996.                                               {    CHT*    IEMSI chats
  997.                                                    MNU*    Image Downloading
  998.                                                    TAB*    TAB support
  999.                                                    ASCII8* 8-bit ASCII supprt }
  1000.      requests     : string[40];               { Requests }
  1001.                                               {    NEWS    Bulletins, news, etc.
  1002.                                                    MAIL*   Logon - Mail Check
  1003.                                                    FILE*   Logon - File Check
  1004.                                                    HOT     Hot-Keys
  1005.                                                    CLR     Screen clearing
  1006.                                                    HUSH*   Do not disturb
  1007.                                                    MORE    Page pausing
  1008.                                                    FSED    Full-screen editor }
  1009.      software     : string[70];               { Terminal Software }
  1010.   end;
  1011.  
  1012.   {
  1013.     *These items are are currently not supported in Telegard because they
  1014.     are things which were provided for systems with these capabilities.  They
  1015.     are listed here for convenience and so that utility authors can make
  1016.     use of them if neccessary.  Some of these options may be used in
  1017.     future versions of Telegard.
  1018.  
  1019.     (Z)The protocol that is selected by having the ZMO flag is protocol Z.
  1020.     If that protocol does not exist, it is not selected.  Protocol Z should
  1021.     be ZMODEM, otherwise the wrong protocol may be selected!
  1022.   }
  1023.  
  1024. (*---------------------------------------------------------------------------*)
  1025.  
  1026.   languagerec=          { LANGUAGE.DAT : Language records }
  1027.   record
  1028.      filename   : string[8];                  { language filename }
  1029.      desc       : string[30];                 { language description }
  1030.      acs        : acstring;                   { language ACS }
  1031.      textpath,                                { primary text path }
  1032.      menuspath  : string[75];                 { primary menus path }
  1033.                                               {   '' = use default }
  1034.      checktext  : boolean;                    { if primary path <> '' }
  1035.      checkmenus : boolean;                    {   and file not found, check }
  1036.                                               {   default path? }
  1037.   end;
  1038.  
  1039. (*---------------------------------------------------------------------------*)
  1040.  
  1041.   lcallers=             { LASTON.DAT : Last callers records }
  1042.   record
  1043.      caller     : longint;                    { system caller number }
  1044.      realname,                                { real name of caller }
  1045.      handle     : string[36];                 { user name of caller }
  1046.      location   : string[30];                 { location of caller }
  1047.      logonspeed : longint;                    { logon speed }
  1048.      logontime  : unixtime;                   { logon time }
  1049.      newuser,                                 { was newuser? }
  1050.      reserved1,                               { RESERVED }
  1051.      hidden     : boolean;                    { hidden from display? }
  1052.      node       : byte;                       { node }
  1053.      logofftime : unixtime;                   { logoff time }
  1054.      uploads,                                 { number of ul/dl }
  1055.      downloads  : word;
  1056.      uk,                                      { number of ul/dl kB }
  1057.      dk         : longint;
  1058.      reserved2  : array[1..8] of byte;        { RESERVED }
  1059.   end;
  1060.  
  1061. (*---------------------------------------------------------------------------*)
  1062.  
  1063.   levelsrec=            { LEVELS.DAT : Membership/validation levels }
  1064.   record
  1065.      desc      : string[50];                  { Description }
  1066.      sl        : byte;                        { SL level }
  1067.      flags1,                                  { Access flags - Set 1 }
  1068.      flags2    : acrqs;                       { Access flags - Set 2 }
  1069.      ac        : uflags;                      { Restriction flags }
  1070.      addfp,                                   { Bonus FilePoints (added) }
  1071.      addcredit,                               { Bonus NetCredits (added) }
  1072.      addtb,                                   { Bonus Timebank (added) }
  1073.      expireday : word;                        { Expire in ## days
  1074.                                                    0 = Never }
  1075.      tolevel   : char;                        { Expire to level A..Z,
  1076.                                                    ! = Delete }
  1077.      reserved  : array[1..25] of byte;        { RESERVED }
  1078.   end;
  1079.  
  1080. (*---------------------------------------------------------------------------*)
  1081.  
  1082.   macrorec=             { MACROS.DAT : Keyboard macro records }
  1083.   record
  1084.      userid : longint;                        { user-ID - from user record }
  1085.                                               {   checked to verify that }
  1086.                                               {   macro pointers are to }
  1087.                                               {   the correct macros }
  1088.      smacro : array[1..4] of string[240];     { stored keystrokes }
  1089.   end;
  1090.  
  1091. (*---------------------------------------------------------------------------*)
  1092.  
  1093.   modemflags=           { MODEM.DAT/MODEMxxx.DAT status flags }
  1094.   (
  1095.      xonxoff,                                 { XON/XOFF (software) flowctl }
  1096.      ctsrts,                                  { CTS/RTS (hardware) flowctl }
  1097.      dtrdrop,                                 { drop DTR to hang up modem }
  1098.      fossilhot,                               { FOSSIL active during DOS }
  1099.      int14                                    { INT 14 driven (no fossil) }
  1100.   );
  1101.  
  1102.   modemrec=             { MODEM.DAT/MODEMxxx.DAT : Modem configuration }
  1103.   record
  1104.      desc         : string[50];               { modem reference description }
  1105.      comport      : byte;                     { COM port number }
  1106.      waitbaud,                                { modem bps rate }
  1107.      lockedbaud   : longint;                  { locked bps rate }
  1108.                                               {    0 = Not Locked }
  1109.      init         : string[80];               { initialization command }
  1110.      answer,                                  { answer command }
  1111.      hangup,                                  { hangup command }
  1112.      offhook      : string[40];               { phone off-hook command }
  1113.      code_ok,                                 { OK result code }
  1114.      code_error,                              { ERROR result code }
  1115.      code_ring,                               { RING result code }
  1116.      code_nocarrier,                          { NO CARRIER result code }
  1117.      code_arq     : string[16];               { error correction string }
  1118.      code_connect : array[1..25] of           { connect strings }
  1119.                        string[16];            {    1 - 300     11 - 19200  }
  1120.                                               {    2 - 1200    12 - 21600  }
  1121.                                               {    3 - 1275    13 - 24000  }
  1122.                                               {    4 - 2400    14 - 26400  }
  1123.                                               {    5 - 4800    15 - 28800  }
  1124.                                               {    6 - 7200    16 - 38400  }
  1125.                                               {    7 - 9600    17 - 57600  }
  1126.                                               {    8 - 12000   18 - 64000  }
  1127.                                               {    9 - 14400   19 - 115200 }
  1128.                                               {   10 - 16800 }
  1129.      reinittime,                              { inactivity re-initialization }
  1130.      delay_cmd,                               { delay after cmd (1/10th) }
  1131.      delay_answer,                            { answer delay (1/10th) }
  1132.      delay_dtr    : byte;                     { delay for DTR drop (1/10th) }
  1133.      flags        : set of modemflags;        { status flags (see above) }
  1134.      irq          : byte;                     { IRQ for non-standard port }
  1135.      address      : string[4];                { base I/O address for port } 
  1136.      ansrings,                                { # rings before answering }
  1137.      ansreset     : byte;                     { seconds before counter reset }
  1138.      reserved     : array[1..67] of byte;     { RESERVED }
  1139.   end;
  1140.  
  1141. (*---------------------------------------------------------------------------*)
  1142.  
  1143.   netflags=             { NETWORK.DAT status flags }
  1144.   (
  1145.      nstrip,                                  { strip message codes? }
  1146.      naddtear,                                { add tear/origin lines? }
  1147.      nholduser,                               { hold all non-SysOp NetMail? }
  1148.      nhold,                                   { def NetMail to "hold"? }
  1149.      ncrash,                                  { def NetMail to "crash"? }
  1150.      nkill,                                   { def NetMail to "kill/sent"? }
  1151.      nstripcolour                             { strip colour codes? }
  1152.   );
  1153.  
  1154.   netaddress=           { NETWORK.DAT : Net address }
  1155.   record
  1156.      zone,net,node,point : word;              { (zone:net/node.point) }
  1157.   end;
  1158.  
  1159.   netaddrrec=           { NETWORK.DAT : Node information }
  1160.   record
  1161.      addr     : netaddress;                   { (zone:net/node.point) }
  1162.      akazone,                                 { aka matching zone:net }
  1163.      akanet   : word;                         { if net=0, match zone only }
  1164.      replynet : string[8];                    { areaname of replies for aka }
  1165.      RESERVED : array[1..18] of byte;         { RESERVED }
  1166.   end;
  1167.  
  1168.   networkrec=           { NETWORK.DAT : Network information }
  1169.   record
  1170.      netaddr      : array[1..20] of           { network addresses }
  1171.                        netaddrrec;
  1172.      origin       : string[50];               { origin line }
  1173.      kludge_color : byte;                     { color of kludge line }
  1174.      quote_color  : byte;                     { color of quoted text }
  1175.      tear_color   : byte;                     { color of tear line }
  1176.      origin_color : byte;                     { color of origin line }
  1177.      flags        : set of netflags;          { status flags }
  1178.      readacs,                                 { Default read ACS }
  1179.      postacs      : acstring;                 { Default post ACS }
  1180.      text_color,                              { color of text line }
  1181.      areaformat,                              { Default area format }
  1182.      areascan,                                { Default scan type }
  1183.      defaddr      : byte;                     { Default address }
  1184.      reserved1    : array[1..37] of byte;     { RESERVED }
  1185.      nodepath     : string[40];               { nodelist path }
  1186.      nodelisttype : byte;                     { Nodelist type
  1187.                                                    0 : None
  1188.                                                    1 : Version 6
  1189.                                                    2 : Version 7
  1190.                                                    3 : FrontDoor }
  1191.      UUCPgate     : netaddress;               { (zone:net/node.point) }
  1192.      sysopacs     : acstring;                 { Default sysop ACS }
  1193.      reserved2    : array[1..26] of byte;     { RESERVED }
  1194.   end;
  1195.  
  1196. (*---------------------------------------------------------------------------*)
  1197.  
  1198.   whosonflags=          { NODES.DAT : Who's Online status flags }
  1199.   (
  1200.      ishidden,                               { user is hidden }
  1201.      isquiet                                 { user not to be disturbed }
  1202.   );
  1203.  
  1204.   nodesrec=             { NODES.DAT : Multi-Node setup }
  1205.   record
  1206.      active      : boolean;                   { node can accept calls }
  1207.      logonbegin,                              { logon starts (0-1440) }
  1208.      logonend    : word;                      { logon ends (0-1440) }
  1209.      logonacs    : acstring;                  { access to logon }
  1210.      logonbps    : longint;                   { minimum logon bps }
  1211.      nodephone   : string[20];                { node phone number }
  1212.      reserved1   : array[1..45] of byte;      { RESERVED }
  1213.  
  1214.      realname,                                { realname }
  1215.      handle      : string[36];                { handle }
  1216.      location    : string[30];                { location }
  1217.      logontime   : unixtime;                  { logon time }
  1218.      statusid    : byte;                      { 0 - waiting for call }
  1219.                                               { 1 - unavailable (offline/down) }
  1220.                                               { 2 - event }
  1221.                                               { 3 - CONNECTED }
  1222.                                               { 4 - waiting for reset }
  1223.      status      : string[36];                { status }
  1224.      bpsrate     : longint;                   { bps rate }
  1225.      userid      : longint;                   { user-ID }
  1226.      flags       : set of whosonflags;        { status }
  1227.   
  1228.      reserved2   : array[1..45] of byte;      { RESERVED }
  1229.   end;
  1230.  
  1231. (*---------------------------------------------------------------------------*)
  1232.  
  1233.   protrec=              { PROTOCOL.DAT : File transfer protocols }
  1234.   record
  1235.      desc     : string[25];                   { description }
  1236.      active,                                  { active? }
  1237.      batch    : boolean;                      { batch? (=filelist) }
  1238.      acs      : acstring;                     { access control }
  1239.      ulcmd,                                   { UL command line }
  1240.      dlcmd    : string[60];                   { DL command line }
  1241.      ulcode,                                  { UL result code }
  1242.      dlcode   : array [1..3] of string[6];    { DL result code }
  1243.      envcmd   : string[60];                   { environment command }
  1244.      templog  : string[25];                   { temporary log file }
  1245.      flist    : string[5];                    { DL file list }
  1246.      logpf,                                   { log - word # (filename) }
  1247.      logpr    : byte;                         { log - word # (result) }
  1248.      success  : boolean;                      { results = success? }
  1249.      bidirec  : boolean;                      { bi-directional? }
  1250.   end;
  1251.  
  1252. (*---------------------------------------------------------------------------*)
  1253.  
  1254.   shortmsgrec=          { SHORTMSG.DAT/INODEnnn.DAT : Logon/Node Receipts }
  1255.   record
  1256.      userid   : longint;                      { to user id (0=deleted) }
  1257.      msg      : string[155];                  { message to user }
  1258.      msgid    : byte;                         { msgid - INTERNAL USE }
  1259.                                               { should *always* be 0 }
  1260.                                               { if set by external utils }
  1261.      reserved : array[1..4] of byte;          { RESERVED }
  1262.   end;
  1263.  
  1264. (*---------------------------------------------------------------------------*)
  1265.  
  1266.   smacrorec =           { SMACROS.DAT : SysOp Macros }
  1267.   record
  1268.      macro : array[1..10] of string[120];    { SysOp macros F1..F10 }
  1269.   end;
  1270.  
  1271. (*---------------------------------------------------------------------------*)
  1272.  
  1273.   timelogrec=           { TIMELOG.DAT : Daily/hourly usage tracking }
  1274.   record
  1275.      startdate      : unixtime;               { date graph started }
  1276.      busyperhour    : array[0..23] of word;   { busy per hour }
  1277.      busyperday     : array[0..6] of          { busy per dow, 20 minute }
  1278.                         array[0..71] of word; {    intervals }
  1279.   end;
  1280.  
  1281. (*---------------------------------------------------------------------------*)
  1282.  
  1283.   voterec=              { VOTING.DAT : Voting records }
  1284.   record
  1285.      active    : boolean;                     { active? }
  1286.      question  : string[75];                  { voting question }
  1287.      initdate  : longint;                     { initialization date }
  1288.      voteacs,                                 { voting acs }
  1289.      addacs    : acstring;                    { add answer acs }
  1290.      numusers  : word;                        { # user's answering question }
  1291.      numans    : byte;                        { # of active answers }
  1292.      answer    : array[0..numvoteas] of
  1293.                     record
  1294.                        desc   : string[60];   { answer description }
  1295.                        numres : word;         { # votes for this answer }
  1296.                     end;
  1297.   end;
  1298.  
  1299. (*****************************************************************************)
  1300. (* ---------------------- EXTERNAL DATA STRUCTURES ------------------------- *)
  1301. (*****************************************************************************)
  1302.  
  1303.  {
  1304.     The following structures are all derived from external sources and are
  1305.     not internal to Telegard 3.0 (i.e. the same format listed below is used
  1306.     for all other compatible products using the same specifications).
  1307.  
  1308.     For more information on the structures which are listed below, please
  1309.     refer to the DEVEL300.DOC documentation, which contains contact
  1310.     information and further reference listings for these structures.
  1311.  }
  1312.  
  1313. (*****************************************************************************)
  1314. (* ------------ NODELIST FILE STRUCTURES ("VERSION 6" FORMAT) -------------- *)
  1315. (*****************************************************************************)
  1316.  
  1317.   nodeflags=            { NODELIST.DAT status flags }
  1318.   (
  1319.      hub,                                     { node is a net hub }
  1320.      host,                                    { node is a net host }
  1321.      region,                                  { node is region coord }
  1322.      zone,                                    { node is a zone coord }
  1323.      cm                                       { runs continuous mail }
  1324.   );
  1325.  
  1326.   modemtypes=           { NODELIST.DAT modem type flags }
  1327.   (
  1328.      hst,                                     { node uses a USRobotics HST modem }
  1329.      pep,                                     { node uses a Telebit PEP modem }
  1330.      v32,                                     { node uses a V.32 modem }
  1331.      v32b,                                    { node uses a V.32bis modem }
  1332.      h96                                      { node uses a Hayes Express96 modem }
  1333.   );
  1334.  
  1335.   nodedatarec=          { NODELIST.DAT : Version 6 nodelist data }
  1336.   record
  1337.      net:integer;                             { net number }
  1338.      node:integer;                            { node number }
  1339.      cost:integer;                            { cost per minute to call }
  1340.      name:array[0..33] of char;               { node name }
  1341.      phone:array[0..39] of char;              { phone number }
  1342.      city:array[0..29] of char;               { city and state }
  1343.      password:array[0..7] of byte;            { password }
  1344.      realcost:integer;                        { phone company's charge }
  1345.      hubnode:integer;                         { node # of this node's hub (0=none) }
  1346.      rate:byte;                               { actual bps rate divided by 300 }
  1347.      modem:set of modemtypes;                 { modem type codes }
  1348.      res1:byte;                               { RESERVED }
  1349.      flags:set of nodeflags;                  { set of flags }
  1350.      res:array[1..2] of byte;                 { RESERVED }
  1351.   end;
  1352.  
  1353.   nodeindexrec=         { NODELIST.IDX : Version 6 nodelist index }
  1354.   record
  1355.      node : integer;                          { node number }
  1356.      net  : integer;                          { net number }
  1357.   end;
  1358.  
  1359. (*****************************************************************************)
  1360. (* ------------ NODELIST FILE STRUCTURES ("VERSION 7" FORMAT) -------------- *)
  1361. (*****************************************************************************)
  1362.  
  1363.   node7flags=            { NODELIST.DAT Version 7 status flags }
  1364.   (
  1365.      ishub,                                   { node is a net hub }
  1366.      ishost,                                  { node is a net host }
  1367.      isregion,                                { node is region coord }
  1368.      isgate,                                  { node is a zone gateway }
  1369.      iscm,                                    { runs continuous mail }
  1370.      res1,res2,res3,res4,res5,                { RESERVED }
  1371.      res6,res7,
  1372.      ispoint                                  { node is a point }
  1373.   );
  1374.  
  1375.   node7datarec=          { NODELIST.DAT : Version 7 nodelist data }
  1376.   record
  1377.      zone,net,node:integer;                   { node address }
  1378.      hubnode:integer;                         { hub node address }
  1379.      callcost,                                { Cost of call }
  1380.      msgfee    : word;                        { Cost to user }
  1381.      flags     : set of node7flags;           { nodelist flags }
  1382.      modem     : byte;                        { RESERVED }
  1383.      phlen,                                   { Phone # length }
  1384.      pwlen,                                   { PW length }
  1385.      boardlen,                                { Board name length }
  1386.      sysoplen,                                { SysOp name length }
  1387.      citylen,                                 { City length }
  1388.      packlen   : byte;                        { Pack total length }
  1389.      baudrate  : byte;                        { bps rate divided by 300 }
  1390.      { ... data ... }                         { packed data - length packlen }
  1391.   end;
  1392.  
  1393. (*****************************************************************************)
  1394. (* ------------------- QWK OFFLINE MAIL FILE STRUCTURES -------------------- *)
  1395. (*****************************************************************************)
  1396.  
  1397.   qdatrec=              { MESSAGES.DAT : Message file header record }
  1398.   record
  1399.      status:char;                             { message status flag:             }
  1400.                                               { ' ' = public, unread             }
  1401.                                               { '-' = public, read               }
  1402.                                               { '+' = private, unread            }
  1403.                                               { '*' = private, read              }
  1404.                                               { '~' = comment to SysOp, unread   }
  1405.                                               { '`' = comment to SysOp, read     }
  1406.                                               { '%' = password protected, unread }
  1407.                                               { '^' = password protected, read   }
  1408.                                               { '!' = group password, unread     }
  1409.                                               { '#' = group password, read       }
  1410.                                               { '$' = group password to all      }
  1411.      number:array[1..7] of char;              { message number }
  1412.      date:array[1..8] of char;                { date (MM-DD-YY) }
  1413.      time:array[1..5] of char;                { time (HH:MM) }
  1414.      msgto:array[1..25] of char;              { To (uppercase) }
  1415.      msgfrom:array[1..25] of char;            { From (uppercase) }
  1416.      subject:array[1..25] of char;            { Subject }
  1417.      password:array[1..12] of char;           { password }
  1418.      reference:array[1..8] of char;           { reference message number }
  1419.      blocks:array[1..6] of char;              { # of blocks in message,  }
  1420.                                               {   including header block }
  1421.      active:byte;                             { $E1=active, $E2=to be deleted }
  1422.      areanum:word;                            { QWK area number }
  1423.      res:array[1..2] of byte;                 { NOT USED }
  1424.      tagline:char;                            { contains network tagline:     }
  1425.                                               { '*' = network tagline present }
  1426.                                               { ' ' = no tagline present      }
  1427.   end;
  1428.  
  1429.   qndxrec=              { *.NDX : Message area index record }
  1430.   record
  1431.      recnum:longint;                          { record number in MESSAGES.DAT,    }
  1432.                                               {   stored in Microsoft MKS$ format }
  1433.      areanum:byte;                            { QWK area number (unused) }
  1434.   end;
  1435.  
  1436. (****************************************************************************)
  1437. (* --------------------------- JAM STRUCTURES ----------------------------- *)
  1438. (****************************************************************************)
  1439.  
  1440.   jaminforec =          { *.JHR: JAM message base header - first record }
  1441.   record
  1442.      signature   : array[1..4]                { message Signature }
  1443.                       of char;                { <J><A><M> followed by <NUL> }
  1444.      datecreated,                             { creation Date }
  1445.      modifycount,                             { modification counter }
  1446.      activemsgs,                              { active Messages }
  1447.      passwordCRC,                             { CRC of password, -1 = none }
  1448.      basemsgnum  : longint;                   { lowest number in index }
  1449.      reserved    : array[1..1000]             { reserved by JAM authors }
  1450.                       of char;
  1451.   end;
  1452.  
  1453.   jammsgattr =          { JAM message base attributes }
  1454.   (
  1455.      jlocal,                                  { local }
  1456.      jintransit,                              { in-transit }
  1457.      jprivate,                                { private }
  1458.      jread,                                   { read by receiver }
  1459.      jsent,                                   { sent }
  1460.      jkillsent,                               { kill msg/sent }
  1461.      jarchivesent,                            { archive msg/sent }
  1462.      jhold,                                   { hold }
  1463.      jcrash,                                  { crash }
  1464.      jimmediate,                              { immediate }
  1465.      jdirect,                                 { direct }
  1466.      jgate,                                   { gate }
  1467.      jfilereq,                                { file requests }
  1468.      jfileattach,                             { files attached }
  1469.      jtruncfiles,                             { truncate (0 len) sent files }
  1470.      jkillfiles,                              { kill sent files }
  1471.      jreceiptreq,                             { receipt requested }
  1472.      jconfirmreq,                             { confirmation of receipt }
  1473.      jorphan,                                 { orphaned message }
  1474.      jencrypt,                                { encrypted message* }
  1475.      jcompress,                               { compressed message* }
  1476.      jescaped,                                { escaped message* }
  1477.      jforcepickup,                            { force pickup }
  1478.      jtypelocal,                              { local only }
  1479.      jtypeecho,                               { for echo dist'n }
  1480.      jtypenet,                                { for netmail dist'n }
  1481.      jRESERVED,                               { 0x04000000L }
  1482.      jRESERVED1,                              { 0x08000000L }
  1483.      jRESERVED2,                              { 0x10000000L }
  1484.      jnomsgdisplay,                           { no message display }
  1485.      jlocked,                                 { locked message }
  1486.      jdeleted                                 { deleted message }
  1487.   );
  1488.  
  1489.   jamhdrrec =           { *.JHR: JAM message headers }
  1490.   record
  1491.      signature   : array[1..4]                { message signature }
  1492.                       of char;                { <J><A><M> followed by <NUL> }
  1493.      revision,                                { JAM revision level }
  1494.      reserved1   : word;                      { reserved by JAM authors }
  1495.      subfieldlen,                             { length of subfields }
  1496.      timesread,                               { # times message read }
  1497.      msgidCRC,                                { CRC-32 of MSGID line }
  1498.      replyCRC,                                { CRC-32 of REPLY line }
  1499.      replyto,                                 { reply to # }
  1500.      reply1st,                                { 1st reply number }
  1501.      replynext   : longint;                   { reply next }
  1502.      date,                                    { date written }
  1503.      datercvd,                                { date received }
  1504.      dateproc    : unixtime;                  { date processed (tosser/scanner) }
  1505.      msgnum      : longint;                   { message number }
  1506.      attribute   : set of jammsgattr;         { attributes }
  1507.      reserved2,                               { reserved by JAM authors }
  1508.      textoffset,                              { offset of text in *.JDT file }
  1509.      textlen,                                 { length of text }
  1510.      passwordCRC,                             { CRC-32 of password }
  1511.      cost        : longint;                   { cost of message }
  1512.   end;
  1513.  
  1514.   jamsubfieldrec =      { *.JHR: subfield records }
  1515.   record
  1516.      fieldid,                                 { subfield ID }
  1517.      reserved1   : word;                      { reserved by JAM authors }
  1518.      datalen     : longint;                   { length of buffer }
  1519.   end;
  1520.  
  1521.   jamindexrec =         { *.JDX: JAM quick index }
  1522.   record
  1523.      userCRC,                                 { CRC-32 of receipients name (lower) }
  1524.      hdroffset   : longint;                   { offset to jamhdrrec }
  1525.   end;
  1526.  
  1527.   jamreadrec =          { *.JLR: JAM last read storage }
  1528.   record
  1529.      userCRC,                                 { CRC-32 of users name (lower) }
  1530.      userID,                                  { unique user-ID }
  1531.      lastread,                                { last read pointer }
  1532.      highread    : longint;                   { high read pointer }
  1533.   end;
  1534.  
  1535. (****************************************************************************)
  1536. (* ------------------------- SQUISH STRUCTURES ---------------------------- *)
  1537. (****************************************************************************)
  1538.  
  1539.  sqbaserec =            { *.SQD: Squish message base header - first record }
  1540.  record
  1541.     len_sqbase,                               { length of this structure }
  1542.     reserved   : word;                        { RESERVED }
  1543.     nummsgs,                                  { number of messages }
  1544.     highmsg,                                  { highest message (=nummsgs) }
  1545.     keepmsgs,                                 { # of messages to keep }
  1546.     hwmsgid,                                  { High water message msg-ID # }
  1547.     lastmsgid  : longint;                     { Last message msg-ID # }
  1548.     basename   : array[1..80] of char;        { basename for Squishfile }
  1549.     beginframe,                               { offset to first message header }
  1550.     lastframe,                                { offset to last message header }
  1551.     freeframe,                                { offset to first FREE header }
  1552.     lastfreeframe,                            { offset to last FREE header }
  1553.     endframe,                                 { offset of end of file }
  1554.     maxmsgs    : longint;                     { maximum number of messages }
  1555.     keepdays   : word;                        { days to keep messages }
  1556.     sqhdrsize  : word;                        { size of header record }
  1557.     reserved2  : array[1..124] of byte;       { RESERVED }
  1558.    end;
  1559.  
  1560.  sqhdrrec =             { *.SQD: Message header }
  1561.  record
  1562.     sqid,                                     { squish ID - $AFAE4453 }
  1563.     nextmsg,                                  { offset to last message }
  1564.     prevmsg,                                  { offset to previous message }
  1565.     framelength,                              { length of header & message }
  1566.     msglength,                                { length of message }
  1567.     ctrllength : longint;                     { length of control information }
  1568.     headertype,                               { Header type
  1569.                                                    Message = 0
  1570.                                                    Free    = 1 }
  1571.     reserved    : word;                       { RESERVED }
  1572.   end;
  1573.  
  1574.   sqshmsgattr =         { Squish Message Attributes }
  1575.   (
  1576.      sprivate,                                { private }
  1577.      scrash,                                  { crash }
  1578.      sread,                                   { read by receiver }
  1579.      ssent,                                   { sent }
  1580.      sfileattach,                             { files attached }
  1581.      sintransit,                              { in-transit }
  1582.      sorphan,                                 { orphaned message }
  1583.      skillsent,                               { kill msg/sent }
  1584.      slocal,                                  { local }
  1585.      shold,                                   { hold }
  1586.      sreserved,                               { reserved }
  1587.      sfilereq,                                { file requests }
  1588.      sreceiptreq,                             { receipt requested }
  1589.      sconfirmreq,                             { confirmation of receipt }
  1590.      saudit,                                  { audit trail requested }
  1591.      supdate,                                 { update request }
  1592.      sscanned,                                { echomail scanned }
  1593.      smsgid,                                  { valid msgid? }
  1594.      sres1,  sres2,  sres3,  sres4,           { reserved }
  1595.      sres5,  sres6,  sres7,  sres8,
  1596.      sres9,  sres10, sres11, sres12,
  1597.      sres13, sres14
  1598.   );
  1599.  
  1600.  sqxmsgrec =            { *.SQD: Message Info Header }
  1601.  record
  1602.     attribute   : set of sqshmsgattr;         { Message attributes }
  1603.     msgfrom     : array[1..36] of char;       { Message from - NUL terminated }
  1604.     msgto       : array[1..36] of char;       { Message to - NUL terminated }
  1605.     subject     : array[1..72] of char;       { Message subject - NUL terminated }
  1606.     origaddr,                                 { Origin/Destination addresses }
  1607.     destaddr    : record
  1608.                      zone, net,
  1609.                      node, point : word;
  1610.                   end;
  1611.     origdate,                                 { Original date (utc) }
  1612.     msgdate     : bitmapdate;                 { Arrival (system) date (utc) }
  1613.     utcoffset   : word;                       { Minutes offset of UTC }
  1614.     replyto     : longint;                    { Reply-to msg-ID # }
  1615.     replies     : array[1..9] of              { Replies msg-ID # }
  1616.                      longint;
  1617.     msgid       : longint;                    { Message ID }
  1618.     rawdate     : array[1..20] of char;       { ASCII date - NUL terminated }
  1619.  end;
  1620.  
  1621.  sqindexrec =           { *.SQI: Squish Message Index }
  1622.  record
  1623.     msgptr,                                   { offset of sqfhdr record }
  1624.     msgid,                                    { msg-ID # }
  1625.     hash   : longint;                         { hash of 'to' name }
  1626.  end;
  1627.  
  1628.  sqreadrec =            { *.SQL: Squish Last Read Index }
  1629.  record
  1630.     msgid : longint;                          { msg-ID # }
  1631.  end;
  1632.  
  1633. (****************************************************************************)
  1634. (* ------------------------ TESTINFO.DAT FORMAT --------------------------- *)
  1635. (****************************************************************************)
  1636.  
  1637.  testinfofilerec =      { TESTINFO.DAT: individual file record }
  1638.  record
  1639.     sfx,                                      { is self-extracting file? }
  1640.     exists     : boolean;                     { file exists }
  1641.     full_path,                                { full file path }
  1642.     path       : string[60];                  { file path }
  1643.     drive      : string[2];                   { file drive (incl colon) }
  1644.     name       : string[8];                   { filename (raw) }
  1645.     ext,                                      { extension }
  1646.     filetype   : string[3];                   { file type* }
  1647.     date       : longint;                     { file date_time (packed) }
  1648.     size       : longint;                     { file size }
  1649.  end;
  1650.  
  1651.  testinforec =          { TESTINFO.DAT }
  1652.  record
  1653.     processed,                                { record has been processed }
  1654.     desc_vendinfo,                            { vendinfo.diz description }
  1655.     desc_import,                              { import descriptions? }
  1656.     addtofdb,                                 { add file to file data base }
  1657.     file_conv,                                { file converted? }
  1658.     user_ansi,                                { detected ansi }
  1659.     user_avatar,                              { detected avatar }
  1660.     user_carrier,                             { carrier detected last check }
  1661.     bbsprocessed     : boolean;               { processed by BBS? }
  1662.     reserved1        : array[1..8] of byte;   { RESERVED }
  1663.     check_count,                              { update/check count }
  1664.     bbs_type,                                 { BBS type ( TG3.0 = 6 ) }
  1665.     user_comport,                             { user com port }
  1666.     exit_level,                               { exit level for test }
  1667.     revision         : byte;                  { testinfo.dat revision level }
  1668.     reserved2        : array[1..9] of byte;   { RESERVED }
  1669.     test_datetime    : longint;               { testing date/time }
  1670.     reserved3        : array[1..40] of byte;  { RESERVED }
  1671.     thd_options,                              { THDPRO command line options }
  1672.     bbs_path,                                 { path to BBS data files }
  1673.     creator,                                  { TESTINFO.DAT creator }
  1674.     thd_log          : string[60];            { THDPRO log path }
  1675.     reserved4        : array[1..183] of byte; { RESERVED }
  1676.     ver_major,                                { creator - major version }
  1677.     ver_minor        : string[2];             { creator - minor version }
  1678.     thd_session      : string[3];             { THDPRO session number }
  1679.     desc_filename    : string[12];            { description file filename }
  1680.     reserved5        : array[1..39] of byte;  { RESERVED }
  1681.     file_original,                            { original file information }
  1682.     file_finished    : testinfofilerec;       { finished file information }
  1683.     reserved6        : array[1..10] of byte;  { RESERVED }
  1684.     desc_length      : integer;               { length fo description }
  1685.     desc             : array[1..1500] of      { description }
  1686.                           char;
  1687.  end;
  1688.  
  1689.